<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script data-ezscrex='false' data-cfasync='false' data-pagespeed-no-defer>var __ez=__ez||{};__ez.stms=Date.now();__ez.evt={};__ez.script={};__ez.ck=__ez.ck||{};__ez.template={};__ez.template.isOrig=false;__ez.queue=function(){var e=0,i=0,t=[],n=!1,o=[],r=[],s=!0,a=function(e,i,n,o,r,s,a){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:window,d=this;this.name=e,this.funcName=i,this.parameters=null===n?null:p(n)?n:[n],this.isBlock=o,this.blockedBy=r,this.deleteWhenComplete=s,this.isError=!1,this.isComplete=!1,this.isInitialized=!1,this.proceedIfError=a,this.fWindow=l,this.isTimeDelay=!1,this.process=function(){f("... func = "+e),d.isInitialized=!0,d.isComplete=!0,f("... func.apply: "+e);var i=d.funcName.split("."),n=null,o=this.fWindow||window;i.length>3||(n=3===i.length?o[i[0]][i[1]][i[2]]:2===i.length?o[i[0]][i[1]]:o[d.funcName]),null!=n&&n.apply(null,this.parameters),!0===d.deleteWhenComplete&&delete t[e],!0===d.isBlock&&(f("----- F'D: "+d.name),u())}},l=function(e,i,t,n,o,r,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:window,l=this;this.name=e,this.path=i,this.async=o,this.defer=r,this.isBlock=t,this.blockedBy=n,this.isInitialized=!1,this.isError=!1,this.isComplete=!1,this.proceedIfError=s,this.fWindow=a,this.isTimeDelay=!1,this.isPath=function(e){return"/"===e[0]&&"/"!==e[1]},this.getSrc=function(e){return void 0!==window.__ezScriptHost&&this.isPath(e)&&"banger.js"!==this.name?window.__ezScriptHost+e:e},this.process=function(){l.isInitialized=!0,f("... file = "+e);var i=this.fWindow?this.fWindow.document:document,t=i.createElement("script");t.src=this.getSrc(this.path),!0===o?t.async=!0:!0===r&&(t.defer=!0),t.onerror=function(){var e={url:window.location.href,name:l.name,path:l.path,user_agent:window.navigator.userAgent};"undefined"!=typeof _ezaq&&(e.pageview_id=_ezaq.page_view_id);var i=encodeURIComponent(JSON.stringify(e)),t=new XMLHttpRequest;t.open("GET","//g.ezoic.net/ezqlog?d="+i,!0),t.send(),f("----- ERR'D: "+l.name),l.isError=!0,!0===l.isBlock&&u()},t.onreadystatechange=t.onload=function(){var e=t.readyState;f("----- F'D: "+l.name),e&&!/loaded|complete/.test(e)||(l.isComplete=!0,!0===l.isBlock&&u())},i.getElementsByTagName("head")[0].appendChild(t)}},d=function(e,i){this.name=e,this.path="",this.async=!1,this.defer=!1,this.isBlock=!1,this.blockedBy=[],this.isInitialized=!0,this.isError=!1,this.isComplete=i,this.proceedIfError=!1,this.isTimeDelay=!1,this.process=function(){}};function c(e){!0!==h(e)&&0!=s&&e.process()}function h(e){if(!0===e.isTimeDelay&&!1===n)return f(e.name+" blocked = TIME DELAY!"),!0;if(p(e.blockedBy))for(var i=0;i<e.blockedBy.length;i++){var o=e.blockedBy[i];if(!1===t.hasOwnProperty(o))return f(e.name+" blocked = "+o),!0;if(!0===e.proceedIfError&&!0===t[o].isError)return!1;if(!1===t[o].isComplete)return f(e.name+" blocked = "+o),!0}return!1}function f(e){var i=window.location.href,t=new RegExp("[?&]ezq=([^&#]*)","i").exec(i);"1"===(t?t[1]:null)&&console.debug(e)}function u(){++e>200||(f("let's go"),m(o),m(r))}function m(e){for(var i in e)if(!1!==e.hasOwnProperty(i)){var t=e[i];!0===t.isComplete||h(t)||!0===t.isInitialized||!0===t.isError?!0===t.isError?f(t.name+": error"):!0===t.isComplete?f(t.name+": complete already"):!0===t.isInitialized&&f(t.name+": initialized already"):t.process()}}function p(e){return"[object Array]"==Object.prototype.toString.call(e)}return window.addEventListener("load",(function(){setTimeout((function(){n=!0,f("TDELAY -----"),u()}),5e3)}),!1),{addFile:function(e,i,n,s,a,d,h,f,u){var m=new l(e,i,n,s,a,d,h,u);!0===f?o[e]=m:r[e]=m,t[e]=m,c(m)},addDelayFile:function(e,i){var n=new l(e,i,!1,[],!1,!1,!0);n.isTimeDelay=!0,f(e+" ...  FILE! TDELAY"),r[e]=n,t[e]=n,c(n)},addFunc:function(e,n,s,l,d,h,f,u,m,p){!0===h&&(e=e+"_"+i++);var w=new a(e,n,s,l,d,f,u,p);!0===m?o[e]=w:r[e]=w,t[e]=w,c(w)},addDelayFunc:function(e,i,n){var o=new a(e,i,n,!1,[],!0,!0);o.isTimeDelay=!0,f(e+" ...  FUNCTION! TDELAY"),r[e]=o,t[e]=o,c(o)},items:t,processAll:u,setallowLoad:function(e){s=e},markLoaded:function(e){if(e&&0!==e.length){if(e in t){var i=t[e];!0===i.isComplete?f(i.name+" "+e+": error loaded duplicate"):(i.isComplete=!0,i.isInitialized=!0)}else t[e]=new d(e,!0);f("markLoaded dummyfile: "+t[e].name)}},logWhatsBlocked:function(){for(var e in t)!1!==t.hasOwnProperty(e)&&h(t[e])}}}();__ez.evt.add=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n()},__ez.evt.remove=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]};__ez.script.add=function(e){var t=document.createElement("script");t.src=e,t.async=!0,t.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(t)};__ez.dot={};__ez.queue.addFile('/detroitchicago/boise.js', '/detroitchicago/boise.js?gcb=195-2&cb=2', true, [], true, false, true, false);__ez.queue.addFile('/parsonsmaize/abilene.js', '/parsonsmaize/abilene.js?gcb=195-2&cb=28', true, [], true, false, true, false);</script>
<script data-ezscrex="false" type="text/javascript" data-cfasync="false">window._ezaq = Object.assign({}, typeof window._ezaq !== "undefined" ? window._ezaq : {}, {"ad_cache_level":1,"domain_id":173770,"ezcache_level":2,"ezcache_skip_code":0,"has_bad_image":0,"has_bad_words":0,"is_sitespeed":0,"lt_cache_level":0,"page_view_id":"b7161485-98dd-421c-518f-a2e3006c3941","response_size_orig":87855,"response_time_orig":12,"template_id":134,"url":"https://plantuml.com/state-diagram","word_count":2386,"worst_bad_word_level":0});__ez.queue.markLoaded('ezaqBaseReady');</script>
<script type="text/javascript">(function(){function storageAvailable(type){var storage;try{storage=window[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return true;}
catch(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==='QuotaExceededError'||e.name==='NS_ERROR_DOM_QUOTA_REACHED')&&(storage&&storage.length!==0);}}
function remove_ama_config(){if(storageAvailable('localStorage')){localStorage.removeItem("google_ama_config");}}
remove_ama_config()})()</script>
<script type="text/javascript">var ezoicTestActive = true</script>
<script data-ezscrex="false" type="text/javascript" data-cfasync="false">window._ezaq = Object.assign({}, typeof window._ezaq !== "undefined" ? window._ezaq : {}, {"ab_test_id":"mod174-c","ad_cache_level":1,"ad_count_adjustment":0,"ad_lazyload_version":0,"ad_load_version":1,"ad_location_ids":"","adx_ad_count":0,"ai_placeholder_cache_level":1,"ai_placeholder_placement_cnt":-1,"bidder_method":1,"bidder_version":3,"city":"Krasnoyarsk","country":"RU","days_since_last_visit":-1,"display_ad_count":0,"domain_id":173770,"domain_test_group":20230802,"ds_adsize_opt_id":-1,"engaged_time_visit":0,"ezcache_level":2,"ezcache_skip_code":0,"form_factor_id":1,"framework_id":1,"has_bad_image":0,"has_bad_words":0,"iab_category":"","iab_category_0":"596","is_embed":false,"is_from_recommended_pages":false,"is_return_visitor":false,"is_sitespeed":0,"last_page_load":"","last_pageview_id":"","lt_cache_level":0,"max_ads":0,"metro_code":0,"optimization_version":1,"page_ad_positions":"","page_view_count":23,"page_view_id":"b7161485-98dd-421c-518f-a2e3006c3941","position_selection_id":0,"postal_code":"660000","pv_event_count":0,"response_size_orig":87855,"response_time_orig":12,"serverid":"i-04b64232fb1ef8e5d","state":"KYA","sub_page_ad_positions":"","t_epoch":1697690862,"template_id":134,"time_on_site_visit":0,"url":"https://plantuml.com/state-diagram","word_count":2386,"worst_bad_word_level":0});__ez.queue.markLoaded('ezaqReady');</script>
<script data-ezscrex='false' data-cfasync='false' data-pagespeed-no-defer>__ez.queue.addFile('/parsonsmaize/mulvane.js', '/parsonsmaize/mulvane.js?gcb=195-2&cb=5', true, ['/parsonsmaize/abilene.js'], true, false, true, false);__ez.queue.addFile('/parsonsmaize/olathe.js', '/parsonsmaize/olathe.js?gcb=195-2&cb=20', false, ['/parsonsmaize/abilene.js','/parsonsmaize/mulvane.js'], true, false, true, false);__ez.queue.addFile('/porpoiseant/et.js', '/porpoiseant/et.js?gcb=195-2&cb=2', false, [], true, false, true, false);!function(){var e;__ez.vep=(e=[],{Add:function(i,t){__ez.dot.isDefined(i)&&__ez.dot.isValid(t)&&e.push({type:"video",video_impression_id:i,domain_id:__ez.dot.getDID(),t_epoch:__ez.dot.getEpoch(0),data:__ez.dot.dataToStr(t)})},Fire:function(){if(void 0===document.visibilityState||"prerender"!==document.visibilityState){if(__ez.dot.isDefined(e)&&e.length>0)for(;e.length>0;){var i=5;i>e.length&&(i=e.length);var t=e.splice(0,i),o=__ez.dot.getURL("/detroitchicago/grapefruit.gif")+"?orig="+(!0===__ez.template.isOrig?1:0)+"&v="+btoa(JSON.stringify(t));__ez.dot.Fire(o)}e=[]}}})}();</script><script data-ezscrex='false' data-cfasync='false' data-pagespeed-no-defer>!function(){function e(i){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(i)}__ez.pel=function(){var i=[];function t(t,o,d,_,n,r,a,s){if(__ez.dot.isDefined(t)&&0!=__ez.dot.isAnyDefined(t.getSlotElementId,t.ElementId)){void 0===s&&(s=!1);var p=parseInt(__ez.dot.getTargeting(t,"ap")),f=__ez.dot.getSlotIID(t),u=__ez.dot.getAdUnit(t,s),z=parseInt(__ez.dot.getTargeting(t,"compid")),g=0,c=0,l=function(i){if("undefined"==typeof _ezim_d)return!1;var t=__ez.dot.getAdUnitPath(i).split("/").pop();if("object"===("undefined"==typeof _ezim_d?"undefined":e(_ezim_d))&&_ezim_d.hasOwnProperty(t))return _ezim_d[t];for(var o in _ezim_d)if(o.split("/").pop()===t)return _ezim_d[o];return!1}(t);"object"==e(l)&&(void 0!==l.creative_id&&(c=l.creative_id),void 0!==l.line_item_id&&(g=l.line_item_id)),__ez.dot.isDefined(f,u)&&__ez.dot.isValid(o)&&("0"===f&&!0!==s||""===u||i.push({type:"impression",impression_id:f,domain_id:__ez.dot.getDID(),unit:u,t_epoch:__ez.dot.getEpoch(0),revenue:d,est_revenue:_,ad_position:p,ad_size:"",bid_floor_filled:n,bid_floor_prev:r,stat_source_id:a,country_code:__ez.dot.getCC(),pageview_id:__ez.dot.getPageviewId(),comp_id:z,line_item_id:g,creative_id:c,data:__ez.dot.dataToStr(o),is_orig:s||__ez.template.isOrig}))}}function o(){void 0!==document.visibilityState&&"prerender"===document.visibilityState||(__ez.dot.isDefined(i)&&i.length>0&&[i.filter((function(e){return e.is_orig})),i.filter((function(e){return!e.is_orig}))].forEach((function(e){for(;e.length>0;){var i=e[0].is_orig||!1,t=5;t>e.length&&(t=e.length);var o=e.splice(0,t),d=__ez.dot.getURL("/porpoiseant/army.gif")+"?orig="+(!0===i?1:0)+"&sts="+btoa(JSON.stringify(o));(void 0!==window.isAmp&&isAmp||void 0!==window.ezWp&&ezWp)&&void 0!==window._ezaq&&_ezaq.hasOwnProperty("domain_id")&&(d+="&visit_uuid="+_ezaq.visit_uuid),__ez.dot.Fire(d)}})),i=[])}return{Add:t,AddAndFire:function(e,i){t(e,i,0,0,0,0,0),o()},AddAndFireOrig:function(e,i){t(e,i,0,0,0,0,0,!0),o()},AddById:function(e,t,o,d){var _=e.split("/");if(__ez.dot.isDefined(e)&&3===_.length&&__ez.dot.isValid(t)){var n=_[0],r={type:"impression",impression_id:_[2],domain_id:__ez.dot.getDID(),unit:n,t_epoch:__ez.dot.getEpoch(0),pageview_id:__ez.dot.getPageviewId(),data:__ez.dot.dataToStr(t),is_orig:o||__ez.template.isOrig};void 0!==d&&(r.revenue=d),i.push(r)}},Fire:o,GetPixels:function(){return i}}}()}();__ez.queue.addFile('/detroitchicago/raleigh.js', '/detroitchicago/raleigh.js?gcb=195-2&cb=6', false, ['/parsonsmaize/abilene.js'], true, false, true, false);__ez.queue.addFile('/detroitchicago/vista.js', '/detroitchicago/vista.js?gcb=195-2&cb=5', false, ['/parsonsmaize/abilene.js'], true, false, true, false);__ez.queue.addFile('/detroitchicago/tampa.js', '/detroitchicago/tampa.js?gcb=195-2&cb=5', false, ['/parsonsmaize/abilene.js'], true, false, true, false);</script><base href=""/><meta name="flattr:id" content="1ew3x0"/><script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "url": "https://plantuml.com",
  "name": "PlantUML",
  "sameAs" : ["https://twitter.com/plantuml","https://en.wikipedia.org/wiki/PlantUML","https://www.wikidata.org/wiki/Q18346546"],
  "logo": "https://cdn-0.plantuml.com/logo3.png",
  "contactPoint": [{
    "@type": "ContactPoint",
    "email": "plantuml@gmail.com",
    "url": "https://plantuml.com",
    "contactType": "customer service"
  }]
}
</script><script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [{
    "@type": "ListItem",
    "position": 1,
    "item": {
      "@id": "https://plantuml.com",
      "name": "Home"
    }
  },{
    "@type": "ListItem",
    "position": 2,
    "item": {
      "@id": "https://plantuml.com/sitemap-language-specification",
      "name": "Language specification"
    }
  },{
    "@type": "ListItem",
    "position": 3,
    "item": {
      "@id": "https://plantuml.com/state-diagram",
      "name": "State Diagram"
  }
  }]
}
</script><link rel="canonical" href="state-diagram.html"/><link rel="alternate" hreflang="x-default" href="state-diagram.html"/><link rel="alternate" hreflang="de" href="de/state-diagram.html"/><link rel="alternate" hreflang="en" href="state-diagram.html"/><link rel="alternate" hreflang="es" href="es/state-diagram.html"/><link rel="alternate" hreflang="fr" href="fr/state-diagram.html"/><link rel="alternate" hreflang="ja" href="ja/state-diagram.html"/><link rel="alternate" hreflang="ru" href="ru/state-diagram.html"/><link rel="alternate" hreflang="ko" href="ko/state-diagram.html"/><link rel="alternate" hreflang="zh" href="zh/state-diagram.html"/><link rel="shortcut icon" href="favicon.ico"/><link rel="preload" as="image" href="svgrepo-house.svg"/><link rel="preload" as="image" href="svgrepo-text-news.svg"/><link rel="preload" as="image" href="svgrepo-rocket-3-start.svg"/><link rel="preload" as="image" href="svgrepo-server.svg"/><link rel="preload" as="image" href="svgrepo-play.svg"/><link rel="preload" as="image" href="svgrepo-forum.svg"/><link rel="preload" as="image" href="svgrepo-add-to-online-cart.svg"/><link rel="preload" as="image" href="svgrepo-forum-message.svg"/><link rel="preload" as="image" href="svgrepo-palette-fill.svg"/><link rel="preload" as="image" href="svgrepo-cpu.svg"/><link rel="preload" as="image" href="svgrepo-books-library.svg"/><link rel="preload" as="image" href="svgrepo-signpost-fill.svg"/><link rel="preload" as="image" href="svgrepo-library.svg"/><link rel="preload" as="image" href="flags21.png"/><link rel="preload" as="image" href="svgrepo-uxwing-light-mode-toggle.svg"/><title>State Diagram syntax and features</title><meta name="description" content="PlantUML state diagram syntax: You can have simple state, composite state, concurrent state, relationship, notes... Changing fonts and colors is also possible."/><meta property="og:type" content="article"/><meta property="og:title" content="State Diagram syntax and features"/><meta property="og:description" content="PlantUML state diagram syntax: You can have simple state, composite state, concurrent state, relationship, notes... Changing fonts and colors is also possible."/><meta property="og:url" content="https://plantuml.com/state-diagram"/><meta property="og:site_name" content="PlantUML.com"/><meta name="twitter:image" content="https://plantuml.com/og-state-diagram"/><meta property="og:locale" content="en"/><meta name="twitter:card" content="summary"/><meta name="twitter:title" content="State Diagram syntax and features"/><meta name="twitter:description" content="PlantUML state diagram syntax: You can have simple state, composite state, concurrent state, relationship, notes... Changing fonts and colors is also possible."/><meta name="twitter:site" content="@PlantUML"/><meta name="twitter:creator" content="@PlantUML"/><script>if(window.location.href.indexOf("/en/")==-1){var lg=navigator.language.substring(0,2);if(lg=="de"){window.location.href="/de/state-diagram"}if(lg=="es"){window.location.href="/es/state-diagram"}if(lg=="fr"){window.location.href="/fr/state-diagram"}if(lg=="ja"){window.location.href="/ja/state-diagram"}if(lg=="ko"){window.location.href="/ko/state-diagram"}if(lg=="ru"){window.location.href="/ru/state-diagram"}if(lg=="zh"){window.location.href="/zh/state-diagram"}};</script><style>li{margin:2px}#external li{margin:13px}.pezoic{max-width:970px}@media screen and (max-width:1600px){.pezoic{max-width:768px}}.coptable{max-width:90%}.mytab{display:inline-block;border-radius:3px;border:1px solid #e1e4e8}.mytab:hover{border:1px dashed #0366d6;cursor:pointer;color:#0366d6;background:#f6f8fa}.cop{margin:25px 10px 0 10px}.cop:hover{cursor:pointer;filter:invert(30%) sepia(75%) saturate(4001%) hue-rotate(201deg) brightness(88%) contrast(98%)}.cop2{margin:25px 10px 0 10px}.cop2:hover{cursor:pointer}.msg{position:absolute;color:#396;background-color:#FFF;margin-top:55px;display:none;border-radius:3px;border:1px solid #4dff00}.mycell0{float:left;vertical-align:top;padding:10px}.mycell0 code:hover{cursor:default;color:#000}.mycell{float:right;vertical-align:top;padding:10px;max-width:55vw;overflow-x:auto}.mycell0 pre{max-width:55vw;overflow-x:auto}.cod{background:#edeff3;padding:2px 5px;border-radius:3px}.colo{display:inline-block;background:#edeff3;padding:7px 12px;border-radius:3px}.tag,.tagg,.tago,.tagr{text-rendering:optimizeLegibility;display:inline-block;padding:3px 5px 2px 4px;text-decoration:none;white-space:nowrap;border:1px solid #999;text-transform:uppercase;text-align:center;border-radius:3px;font-size:11px;font-weight:bold;line-height:90%}.tag{background-color:#eee}.tagg{background-color:#98fb98}.tago{background-color:#fafa00}.tagr{background-color:#ff4500}a{text-decoration:none;color:#0366d6}a:hover{text-decoration:underline}.menu1{border:0;font-family:Helvetica,sans-serif;font-size:14px;padding:0;margin:0;white-space:nowrap;overflow:hidden;vertical-align:middle;line-height:30px}.menu1 a{text-align:center;padding:10px 7px 10px 7px;text-decoration:none;color:#637282}.menu1 a:hover{color:#0366d6}#menu0{top:0;z-index:4;margin:0 0 0 10px;padding:0}@media screen and (max-width:1200px){#menu0{visibility:hidden}}.mhov img{margin:0 5px 0 0;padding:0}.mhov:hover{filter:invert(25%) sepia(97%) saturate(2026%) hue-rotate(201deg) brightness(91%) contrast(98%)}#menuside2{border:0;font-family:Helvetica,sans-serif;font-size:14px;padding:20px 0 4px 0;margin:0}#menuside2 span{vertical-align:top}#menuside2 li{list-style:none;position:relative;padding:0;margin:10px 20px 10px 10px;border:0}#menuside2 li a{display:inline-block;text-decoration:none;color:#637282;width:100%}#BC{z-index:0;padding-top:5px;top:35px}.breadcrumb{z-index:1;font-family:Helvetica,sans-serif;font-size:14px;text-align:center;display:inline-block;overflow:hidden;border-radius:5px}.breadcrumb a{text-decoration:none;outline:0;display:block;float:left;font-size:12px;line-height:24px;color:#373f49;padding:0 10px 0 35px;background:#f0f1f1;background:linear-gradient(#f0f1f1,#c6d2d2);position:relative}.breadcrumb a:first-child{padding-left:21px;border-radius:5px 0 0 5px}.breadcrumb a:first-child:before{left:14px}.breadcrumb a:last-child{visibility:hidden}.breadcrumb a.active,.breadcrumb a:hover{color:#0366d6;background:#c6d2d2;background:linear-gradient(#e3e4e4,#b8c7c7)}.breadcrumb a.active:after,.breadcrumb a:hover:after{background:#c6d2d2;background:linear-gradient(135deg,#e3e4e4,#b8c7c7)}.breadcrumb a:after{content:'';position:absolute;top:0;right:-12px;width:24px;height:24px;transform:scale(0.707) rotate(45deg);z-index:1;background:#f0f1f1;background:linear-gradient(135deg,#f0f1f1,#c6d2d2);box-shadow:2px -2px 0 2px rgba(0,0,0,0.1),3px -3px 0 2px rgba(255,255,255,0.1);border-radius:0 5px 0 50px}.breadcrumb a:last-child:after{content:none;visibility:hidden}.lga,.lga a,.lgi,.lgi a{font-family:Helvetica,sans-serif;font-size:13px;text-align:center;color:#fff;padding:0 5px;margin:0}.lga,.lga a{background-color:#008}.lgi,.lgi a{background-color:#888}.lga:hover,.lga:hover a{text-decoration:none;color:#BBB}.lgi:hover,.lgi:hover a{text-decoration:none;color:#CCC}</style><style>.backtop{margin:0 10px}.backtop:hover{cursor:pointer;filter:invert(30%) sepia(75%) saturate(4001%) hue-rotate(201deg) brightness(88%) contrast(98%)}</style><style>.dropbtn{padding:0;border:0;background:0}.dropdown{position:relative;display:inline-block;margin:0 10px}.dropdown-content{display:none;position:absolute;background-color:#f1f1f1;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,0.2);z-index:1}.dropdown-content img{vertical-align:middle;margin:0 8px 0 1px}.dropdown-content a{font-size:small;font-weight:normal;color:black;padding:5px 10px;text-decoration:none;display:block}.dropdown-content a:hover{background-color:#ddd;color:#0366d6}.dropdown:hover .dropdown-content{display:block}.dropdown:hover .dropbtn{background-color:#3e8e41}</style><style>#flex1{margin:0;padding:0;display:flex;flex-direction:row;width:378px;height:100%}#lll{flex-grow:1;flex-shrink:1;max-width:162px;overflow:hidden}#mmm{flex-grow:0;flex-shrink:0;background:#edeff3;width:210px;min-width:210px;max-width:210px;flex-grow:0;flex-shrink:0;border-left:1px solid #d4d8de}#qqq{flex-grow:0;flex-shrink:0;width:4px;min-width:4px;max-width:4px;flex-grow:0;flex-shrink:0}#rrr{flex-grow:1;flex-shrink:1;max-width:162px;overflow:hidden}.cde{display:flex;flex-direction:column;justify-content:space-between;height:100%}.cd{display:flex;flex-direction:column;justify-content:space-start;height:100%}.aaa{height:30px;min-height:30px;max-height:30px;flex-grow:0;flex-shrink:0;background:#edeff3;border-bottom:1px solid #d4d8de}.bbb,.bbborder{flex-grow:1;flex-shrink:0}.bbborder{border-left:1px solid #d4d8de}#header{z-index:10;position:fixed;left:378px;right:0;height:30px;top:0;background:#edeff3;border-bottom:1px solid #d4d8de}#header2{z-index:7;position:fixed;left:378px;right:0;height:10px;top:30px;background:#fefefe}#left0{top:0;position:fixed;left:0;margin:0;bottom:0;width:378px;padding:0;z-index:2}#root{padding:0;margin:40px 0 0 388px;background:#fefefe}body{margin:auto;overflow-x:hidden;background:#fefefe}@media screen and (max-width:1190px){#flex1,#left0{width:215px}#root{margin:40px 0 0 224px}#header,#header2{left:215px}#left0{left:0}#lll,#rrr{width:0;visibility:hidden;flex-grow:0;flex-shrink:0}}@media screen and (max-width:1010px){#root{margin:0 0 0 216px}#header,#header2{display:none}#lll,#qqq{width:0;visibility:hidden;flex-grow:0;flex-shrink:0}#mmm{border-right:1px solid #d4d8de}}@media screen and (min-width:1700px){#header,#header2{left:518px}#left0,#flex1{width:518px}#root{margin-left:528px}#lll,#rrr{max-width:302px}}</style><script>window.pushMST_config={vapidPK:"BBodn2vLFoDO5AdCfmOOzNmcUsn52kTA6JNZNYVFymzEdWHonz_bkUcsaTkPXHvNGRkRUSAxMbup-H0l2sb1h_Q",enableOverlay:true,swPath:"/sw.js",i18n:{}};var pushmasterTag=document.createElement("script");pushmasterTag.src="https://cdn.pushmaster-cdn.xyz/scripts/publishers/629f5e297baecc00098a271b/SDK.js";pushmasterTag.setAttribute("defer","");var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(pushmasterTag,firstScriptTag);</script><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-TKZNNQT9CZ"></script><script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date());gtag("config","G-TKZNNQT9CZ");</script><script>var llg="en";var az=0;var amdark=0;function ljs(b){if(az){return false}var a=document.createElement("script");a.type="text/javascript";a.src="/btn-"+b+".js";document.body.innerHTML="<i style='position:absolute;top:30%;width:100%;'><center>Loading in progress...";document.body.appendChild(a)}function ctc(c){document.getElementById("img"+c).classList.remove("cop");document.getElementById("img"+c).classList.add("cop2");document.getElementById("pre"+c).style.backgroundColor="#4dff00";document.getElementById("msg"+c).style.display="inline";setTimeout(function(){document.getElementById("img"+c).classList.remove("cop2");document.getElementById("img"+c).classList.add("cop");document.getElementById("pre"+c).style.backgroundColor="";document.getElementById("msg"+c).style.display="none"},800);text=document.getElementById("pre"+c).innerText;if(window.clipboardData&&window.clipboardData.setData){return window.clipboardData.setData("Text",text)}else{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var a=document.createElement("textarea");a.textContent=text;a.style.position="fixed";document.body.appendChild(a);a.select();try{return document.execCommand("copy")}catch(b){return false}finally{document.body.removeChild(a)}}}};</script><script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script type='text/javascript'>
var ezoTemplate = 'pub_site';
var ezouid = '1';
var ezoFormfactor = '1';
</script><script data-ezscrex="false" type='text/javascript'>
var soc_app_id = '0';
var did = 173770;
var ezdomain = 'plantuml.com';
var ezoicSearchable = 1;
</script>
<script data-ezscrex='false' data-pagespeed-no-defer data-cfasync='false'>
function create_ezolpl() {
	var d = new Date();
	d.setTime(d.getTime() + (365*24*60*60*1000));
	var expires = "expires="+d.toUTCString();
	__ez.ck.setByCat("ezux_lpl_173770=" + new Date().getTime() + "|" + _ezaq.page_view_id + "|" + _ezaq.is_return_visitor + "; " + expires, 3);
}
function attach_ezolpl() {
	if (document.readyState === "complete") {
		create_ezolpl();
		return;
	}
	window.addEventListener("load", create_ezolpl);
}

__ez.queue.addFunc("attach_ezolpl", "attach_ezolpl", null, false, ['/detroitchicago/boise.js'], true, false, false, false);
</script></head><body><div id="left0"><div id="flex1"><div id="lll"><div class="cde"><div></div><div><span id="ezoic-pub-ad-placeholder-131"></span><!-- ezoic_pub_ad_placeholder-131-sidebar-120x600-131-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-131-sidebar-160x600-131-nonexxxnonexxxxxxezmaxscaleval100 --></div><div></div></div></div><div id="mmm"><div class="cde"><div><div><span id="ezoic-pub-ad-placeholder-105"></span><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-120x240-105-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-125x125-105-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-180x150-105-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-105-sidebar_middle-200x200-105-nonexxxnonexxxxxxezmaxscaleval100 --></div><ul id="menuside2"><li><a href="index.html" class="mhov"><img src="svgrepo-house.svg" width="16" height="16"/><span>Home</span></a></li><li><a href="news.html" class="mhov"><img src="svgrepo-text-news.svg" width="16" height="16"/><span>What&#39;s New ?</span></a></li><li><a href="starting.html" class="mhov"><img src="svgrepo-rocket-3-start.svg" width="16" height="16"/><span>Getting Started</span></a></li><li><a href="https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000" class="mhov"><img src="svgrepo-server.svg" width="16" height="16"/><span>Online Server</span></a></li><li><a href="running.html" class="mhov"><img src="svgrepo-play.svg" width="16" height="16"/><span>Running</span></a></li><li><a href="faq.html" class="mhov"><img src="svgrepo-forum.svg" width="16" height="16"/><span>F.A.Q.</span></a></li><li><a href="download.html" class="mhov"><img src="svgrepo-add-to-online-cart.svg" width="16" height="16"/><span>Download</span></a></li><li><a href="qa.html" class="mhov"><img src="svgrepo-forum-message.svg" width="16" height="16"/><span>Forum</span></a></li><li><a href="theme.html" class="mhov"><img src="svgrepo-palette-fill.svg" width="16" height="16"/><span>Theme</span></a></li><li><a href="preprocessing.html" class="mhov"><img src="svgrepo-cpu.svg" width="16" height="16"/><span>Preprocessing</span></a></li><li><a href="stdlib.html" class="mhov"><img src="svgrepo-books-library.svg" width="16" height="16"/><span>Standard Library</span></a></li><li><a href="https://crashedmind.github.io/PlantUMLHitchhikersGuide" class="mhov"><img src="svgrepo-signpost-fill.svg" width="16" height="16"/><span>Hitchhiker&#39;s Guide</span></a></li><li><a href="guide.html" class="mhov"><img src="svgrepo-library.svg" width="16" height="16"/><span>PDF Guide</span></a></li></ul><div><span id="ezoic-pub-ad-placeholder-108"></span><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-120x240-108-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-125x125-108-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-180x150-108-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-108-sidebar_middle-200x200-108-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><div></div><div style="margin-bottom:35px;"><span id="ezoic-pub-ad-placeholder-186"></span><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-120x240-186-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-125x125-186-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-180x150-186-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-186-sidebar_middle-200x200-186-nonexxxnonexxxxxxezmaxscaleval100 --></div></div></div><div id="qqq"><div class="cd"><div class="aaa"></div><div class="bbborder"></div></div></div><div id="rrr"><div class="cd"><div class="aaa"></div><div style="height:5px;"></div><div class="bbb"><div class="cde"><div></div><div><span id="ezoic-pub-ad-placeholder-175"></span><!-- ezoic_pub_ad_placeholder-175-sidebar-120x600-175-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-175-sidebar-160x600-175-nonexxxnonexxxxxxezmaxscaleval100 --></div><div></div></div></div></div></div></div></div><style>#contmenu{display:flex;height:30px;width:100%;margin:0;padding:0}#contmenua{height:30px;padding-right:25px}#contmenub{z-index:15;display:inline-block;flex-grow:1;flex-shrink:1;height:30px;background-color:#edeff3}#magic{white-space:nowrap;overflow:hidden;z-index:14;position:fixed;top:0;right:50px;height:30px;width:30px}#magic2{white-space:nowrap;overflow:hidden;z-index:16;position:fixed;top:0;right:0;height:30px;width:50px;background-color:#edeff3}#magic2 img{margin:5px 0 0 5px;filter:invert(44%) sepia(27%) saturate(310%) hue-rotate(170deg) brightness(92%) contrast(83%)}#magic2:hover img{filter:invert(25%) sepia(97%) saturate(2026%) hue-rotate(201deg) brightness(91%) contrast(98%)}#magic:hover #svgrepoleft{filter:invert(22%) sepia(53%) saturate(4563%) hue-rotate(202deg) brightness(95%) contrast(98%)}#magic:hover{width:100%;height:31px}#aze{height:30px;display:flex;flex-direction:row-reverse}#aze1{height:30px;background-color:#edeff3}#aze2{height:30px;background-color:#edeff3;padding-left:10px;border-left:1px solid #d4d8de;border-bottom:1px solid #d4d8de}#aze1 img{filter:invert(46%) sepia(6%) saturate(1254%) hue-rotate(171deg) brightness(94%) contrast(92%)}#aze3{width:3px;height:30px;background-color:#edeff3}</style><div id="header"><div id="contmenu"><div id="contmenua"><div class="menu1"><a href="sequence-diagram.html">Sequence</a><a href="use-case-diagram.html">Use Case</a><a href="class-diagram.html">Class</a><a href="activity-diagram-beta.html">Activity</a><a href="component-diagram.html">Component</a><a href="state-diagram.html">State</a><a href="object-diagram.html">Object</a><a href="deployment-diagram.html">Deployment</a><a href="timing-diagram.html">Timing</a><a href="nwdiag.html">Network</a><a href="salt.html">Wireframe</a><a href="archimate.html">Archimate</a><a href="gantt-diagram.html">Gantt</a><a href="mindmap-diagram.html">MindMap</a><a href="wbs-diagram.html">WBS</a><a href="json.html">JSON</a><a href="yaml.html">YAML</a></div></div><div id="contmenub"></div></div><div id="magic"><div id="aze"><div id="aze1"><img id="svgrepoleft" width="30" height="30" src="svgrepo-left.svg"/></div><div id="aze2"><div class="menu1"><a href="sequence-diagram.html">Sequence</a><a href="use-case-diagram.html">Use Case</a><a href="class-diagram.html">Class</a><a href="activity-diagram-beta.html">Activity</a><a href="component-diagram.html">Component</a><a href="state-diagram.html">State</a><a href="object-diagram.html">Object</a><a href="deployment-diagram.html">Deployment</a><a href="timing-diagram.html">Timing</a><a href="nwdiag.html">Network</a><a href="salt.html">Wireframe</a><a href="archimate.html">Archimate</a><a href="gantt-diagram.html">Gantt</a><a href="mindmap-diagram.html">MindMap</a><a href="wbs-diagram.html">WBS</a><a href="json.html">JSON</a><a href="yaml.html">YAML</a></div></div><div id="aze3"></div></div></div><div id="magic2"><a href="en-dark/state-diagram.html"><img src="svgrepo-uxwing-light-mode-toggle.svg" height="20"/></a></div></div><div id="header2"></div><div id="root"><style>#haut1{margin:50px 0 20px;padding:0;min-height:80px}#donate{padding-top:5px;min-height:30px}</style><div id="haut1"><div style="float:left;"><div class="breadcrumb"><a href="sitemap.html">PlantUML</a><a href="sitemap-language-specification.html">Language specification</a><a href="state-diagram.html">State Diagram</a><a href="state-diagram.html#"></a></div><div id="donate">   <a href="https://discord.gg/sXhzexAQGh" style="text-decoration: none;"><img src="https://img.shields.io/discord/1083727021328306236?color=5865F2&amp;logo=discord&amp;logoColor=white" alt="Discord server"/></a>   <a href="https://github.com/sponsors/plantuml/" style="text-decoration: none;"><img src="https://img.shields.io/github/sponsors/plantuml?logo=github"/></a>   <a href="https://www.patreon.com/bePatron?patAmt=1&amp;u=527450&amp;rid=152970" style="text-decoration: none;"><img src="https://img.shields.io/badge/patreon-122-chocolate?logo=patreon"/></a>   <a href="lp.html" style="text-decoration: none;"><img src="https://img.shields.io/liberapay/patrons/plantuml?color=gold&amp;logo=liberapay&amp;label=liberapay"/></a>   <a href="en/paypal.html" style="text-decoration: none;"><img src="https://img.shields.io/badge/paypal-296-skyblue?logo=paypal&amp;logoColor=red"/></a></div></div><div style="float:right; margin:3px 0;"><style>#langlist{display:flex;justify-content:space-between;width:317px;height:16px;margin:3px 10px 3px 0}.sel2{border:2px solid #fefefe}.nosel2{border:2px solid #fefefe;filter:grayscale(100%) opacity(75%)}.sel2:hover,.nosel2:hover{cursor:pointer;border:2px solid #0366d6;border-spacing:0;filter:grayscale(0);filter:contrast(200%);filter:brightness(150%)}#flag1,#flag2,#flag3,#flag4,#flag5,#flag6,#flag7,#flag8{background:url(flags21.png);background-repeat:no-repeat;background-clip:content-box;width:22px;height:16px}#flag2{background-position:-22px 0}#flag3{background-position:-44px 0}#flag4{background-position:-66px 0}#flag5{background-position:-88px 0}#flag6{background-position:-110px 0}#flag7{background-position:-132px 0}#flag8{background-position:-154px 0}</style><div id="langlist"><div id="flag1" onclick="location.href=&#39;/en/state-diagram&#39;" class="sel2"></div><div id="flag2" onclick="location.href=&#39;/de/state-diagram&#39;" class="nosel2"></div><div id="flag3" onclick="location.href=&#39;/es/state-diagram&#39;" class="nosel2"></div><div id="flag4" onclick="location.href=&#39;/fr/state-diagram&#39;" class="nosel2"></div><div id="flag5" onclick="location.href=&#39;/ja/state-diagram&#39;" class="nosel2"></div><div id="flag6" onclick="location.href=&#39;/ko/state-diagram&#39;" class="nosel2"></div><div id="flag7" onclick="location.href=&#39;/ru/state-diagram&#39;" class="nosel2"></div><div id="flag8" onclick="location.href=&#39;/zh/state-diagram&#39;" class="nosel2"></div></div></div></div><p><style>#topsticky{z-index:2;margin:0 240px 0 0}@media screen and (min-height:800px){#topsticky{position:sticky;top:40px}}@media screen and (max-width:1500px){#topsticky{margin:0}}</style></p><div id="topsticky"><span id="ezoic-pub-ad-placeholder-647"></span><!-- ezoic_pub_ad_placeholder-647-under_page_title-320x100-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-300x50v2-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-320x50-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-468x60-647-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-647-under_page_title-728x90-647-nonexxxnonexxxxxxezmaxscaleval100 --></div><p><a style="position:relative;top:-38px;" name="884021fe8248cf7e"></a><style>#toc{z-index:2;position:sticky;top:40px;list-style-type:none;margin:0;padding:0 10px}.chap{clear:both}#toc ul{list-style-type:none;max-height:87vh;overflow-y:auto;background:#f6f8fa;border-width:2px;border-style:groove;border-radius:3px;border-color:#e1e4e8;margin:0;padding:0}@media screen and (min-height:450px){#toc ul{max-height:89.5vh}}@media screen and (min-height:550px){#toc ul{max-height:91.5vh}}@media screen and (min-height:700px){#toc ul{max-height:93.5vh}}@media screen and (min-height:900px){#toc ul{max-height:94.5vh}}#toc li{margin:5px 5px 5px 10px;padding:0}@media screen and (max-width:1500px){#toctd{display:none}#toc{display:none}}</style><table border="0" cellspacing="0" cellpadding="0" width="100%"><tbody><tr valign="top" width="100%"><td valign="top"><h1 class="chap"><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#0"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#0"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#0"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>State Diagram</h1><p></p><a href="https://en.wikipedia.org/wiki/State_diagram"><strong>State diagrams</strong></a> provide a visual representation of the various states a system or an object can be in, as well as the transitions between those states. They are essential in modeling the dynamic behavior of systems, capturing how they respond to different events over time. State diagrams depict the system&#39;s life cycle, making it easier to understand, design, and optimize its behavior. <p></p> Using <a href="index.html"><strong>PlantUML</strong></a> to create state diagrams offers several advantages: <ul><li><strong>Text-Based Language</strong>: Quickly define and visualize the states and transitions without the hassle of manual drawing.</li><li><strong>Efficiency and Consistency</strong>: Ensure streamlined diagram creation and easy version control.</li><li><strong>Versatility</strong>: Integrate with various documentation platforms and support multiple output formats.</li><li><strong>Open-Source &amp; Community Support</strong>: Backed by a <a href="qa.html"><strong>strong community</strong></a> that continuously contributes to its enhancements and offers invaluable resources.</li></ul><a style="position:relative;top:-38px;" name="7d9e703ac421ea25"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#1"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#1"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#1"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Simple State</h2> You can use <code class="cod">[*]</code> for the starting point and ending point of the state diagram. <p></p> Use <code class="cod">--&gt;</code> for arrows. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgceb287ae8db4b8eefa03f44e0a71c7c4" class="msg"> 🎉 Copied! </div><img width="16" height="16" id="imgceb287ae8db4b8eefa03f44e0a71c7c4" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;ceb287ae8db4b8eefa03f44e0a71c7c4&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;ceb287ae8db4b8eefa03f44e0a71c7c4&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;ceb287ae8db4b8eefa03f44e0a71c7c4&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="preceb287ae8db4b8eefa03f44e0a71c7c4">@startuml

[*] --&gt; State1
State1 --&gt; [*]
State1 : this is a string
State1 : this is another string

State1 -&gt; State2
State2 --&gt; [*]

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="241" height="241" class="scale" src="imgw/img-ceb287ae8db4b8eefa03f44e0a71c7c4.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="b99e918943f68545"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-179"></span><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-234x60-179-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-468x60-179-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-728x90-179-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-179-under_second_paragraph-970x90-179-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#2"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#2"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#2"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Change state rendering</h2><p></p> You can use <code class="cod">hide empty description</code> to render state as simple box. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgd2032858b80b22618fcf934c9cfaa882" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgd2032858b80b22618fcf934c9cfaa882" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;d2032858b80b22618fcf934c9cfaa882&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;d2032858b80b22618fcf934c9cfaa882&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;d2032858b80b22618fcf934c9cfaa882&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pred2032858b80b22618fcf934c9cfaa882">@startuml
hide empty description
[*] --&gt; State1
State1 --&gt; [*]
State1 : this is a string
State1 : this is another string

State1 -&gt; State2
State2 --&gt; [*]
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="230" height="241" class="scale" src="imgw/img-d2032858b80b22618fcf934c9cfaa882.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="a70cc614da79064a"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#3"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#3"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#3"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Composite state</h2><p></p><p></p> A state can also be composite. You have to define it using the <code class="cod">state</code> keywords and brackets. <p></p><h3>Internal sub-state</h3><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msge9de2c197e2d0d00dc6297601d08bc4f" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imge9de2c197e2d0d00dc6297601d08bc4f" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;e9de2c197e2d0d00dc6297601d08bc4f&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;e9de2c197e2d0d00dc6297601d08bc4f&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;e9de2c197e2d0d00dc6297601d08bc4f&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pree9de2c197e2d0d00dc6297601d08bc4f">@startuml
scale 350 width
[*] --&gt; NotShooting

state NotShooting {
  [*] --&gt; Idle
  Idle --&gt; Configuring : EvConfig
  Configuring --&gt; Idle : EvConfig
}

state Configuring {
  [*] --&gt; NewValueSelection
  NewValueSelection --&gt; NewValuePreview : EvNewValue
  NewValuePreview --&gt; NewValueSelection : EvNewValueRejected
  NewValuePreview --&gt; NewValueSelection : EvNewValueSaved

  state NewValuePreview {
     State1 -&gt; State2
  }

}
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="350" height="530" class="scale" src="imgw/img-e9de2c197e2d0d00dc6297601d08bc4f.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p><h3>Sub-state to sub-state</h3><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg6bb80ca8c5710676f27643c9a7dc5130" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img6bb80ca8c5710676f27643c9a7dc5130" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;6bb80ca8c5710676f27643c9a7dc5130&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;6bb80ca8c5710676f27643c9a7dc5130&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;6bb80ca8c5710676f27643c9a7dc5130&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre6bb80ca8c5710676f27643c9a7dc5130">@startuml
state A {
  state X {
  }
  state Y {
  }
}
 
state B {
  state Z {
  }
}

X --&gt; Z
Z --&gt; Y
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="180" height="240" class="scale" src="imgw/img-6bb80ca8c5710676f27643c9a7dc5130.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/3300/add-a-new-state-diagram-example">QA-3300</a>]</em><a style="position:relative;top:-38px;" name="ed8ef97e6d16ba84"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-114"></span><!-- ezoic_pub_ad_placeholder-114-mid_content-234x60-114-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-114-mid_content-468x60-114-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-114-mid_content-728x90-114-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-114-mid_content-970x90-114-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#4"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#4"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#4"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Long name</h2><p></p><p></p> You can also use the <code class="cod">state</code> keyword to use long description for states. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg51aa11da55ad79c113cc44b6b720bda1" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img51aa11da55ad79c113cc44b6b720bda1" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;51aa11da55ad79c113cc44b6b720bda1&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;51aa11da55ad79c113cc44b6b720bda1&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;51aa11da55ad79c113cc44b6b720bda1&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre51aa11da55ad79c113cc44b6b720bda1">@startuml
scale 600 width

[*] -&gt; State1
State1 --&gt; State2 : Succeeded
State1 --&gt; [*] : Aborted
State2 --&gt; State3 : Succeeded
State2 --&gt; [*] : Aborted
state State3 {
  state &#34;Accumulate Enough Data\nLong State Name&#34; as long1
  long1 : Just a test
  [*] --&gt; long1
  long1 --&gt; long1 : New Data
  long1 --&gt; ProcessData : Enough Data
}
State3 --&gt; State3 : Failed
State3 --&gt; [*] : Succeeded / Save Result
State3 --&gt; [*] : Aborted

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="600" height="630" class="scale" src="imgw/img-51aa11da55ad79c113cc44b6b720bda1.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="73b918d90b24a6c6"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#5"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#5"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#5"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>History [[H], [H*]]</h2><p></p> You can use <code class="cod">[H]</code> for the history and <code class="cod">[H*]</code> for the deep history of a substate. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg04c89867e73cee2cc9daac59de4af81e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img04c89867e73cee2cc9daac59de4af81e" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;04c89867e73cee2cc9daac59de4af81e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;04c89867e73cee2cc9daac59de4af81e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;04c89867e73cee2cc9daac59de4af81e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre04c89867e73cee2cc9daac59de4af81e">@startuml
[*] -&gt; State1
State1 --&gt; State2 : Succeeded
State1 --&gt; [*] : Aborted
State2 --&gt; State3 : Succeeded
State2 --&gt; [*] : Aborted
state State3 {
  state &#34;Accumulate Enough Data&#34; as long1
  long1 : Just a test
  [*] --&gt; long1
  long1 --&gt; long1 : New Data
  long1 --&gt; ProcessData : Enough Data
  State2 --&gt; [H]: Resume
}
State3 --&gt; State2 : Pause
State2 --&gt; State3[H*]: DeepResume
State3 --&gt; State3 : Failed
State3 --&gt; [*] : Succeeded / Save Result
State3 --&gt; [*] : Aborted
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="682" height="614" class="scale" src="imgw/img-04c89867e73cee2cc9daac59de4af81e.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="7443558300f98341"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-115"></span><!-- ezoic_pub_ad_placeholder-115-long_content-234x60-115-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-115-long_content-468x60-115-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-115-long_content-728x90-115-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-115-long_content-970x90-115-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#6"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#6"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#6"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Fork [fork, join]</h2><p></p><p></p> You can also fork and join using the <code class="cod">&lt;&lt;fork&gt;&gt;</code> and <code class="cod">&lt;&lt;join&gt;&gt;</code> stereotypes. <p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgad0251a5dd7d5730310513a7128cbbf0" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgad0251a5dd7d5730310513a7128cbbf0" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;ad0251a5dd7d5730310513a7128cbbf0&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;ad0251a5dd7d5730310513a7128cbbf0&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;ad0251a5dd7d5730310513a7128cbbf0&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pread0251a5dd7d5730310513a7128cbbf0">@startuml

state fork_state &lt;&lt;fork&gt;&gt;
[*] --&gt; fork_state
fork_state --&gt; State2
fork_state --&gt; State3

state join_state &lt;&lt;join&gt;&gt;
State2 --&gt; join_state
State3 --&gt; join_state
join_state --&gt; State4
State4 --&gt; [*]

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="170" height="469" class="scale" src="imgw/img-ad0251a5dd7d5730310513a7128cbbf0.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="cb648904a5cede7d"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#7"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#7"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#7"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Concurrent state [--, ||]</h2><p></p><p></p> You can define concurrent state into a composite state using either <code class="cod">--</code> or <code class="cod">||</code> symbol as separator. <p></p><h3>Horizontal separator <code class="cod">--</code></h3><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgb84f91ab304f48c1054e044f120d4a61" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgb84f91ab304f48c1054e044f120d4a61" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;b84f91ab304f48c1054e044f120d4a61&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;b84f91ab304f48c1054e044f120d4a61&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;b84f91ab304f48c1054e044f120d4a61&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="preb84f91ab304f48c1054e044f120d4a61">@startuml
[*] --&gt; Active

state Active {
  [*] -&gt; NumLockOff
  NumLockOff --&gt; NumLockOn : EvNumLockPressed
  NumLockOn --&gt; NumLockOff : EvNumLockPressed
  --
  [*] -&gt; CapsLockOff
  CapsLockOff --&gt; CapsLockOn : EvCapsLockPressed
  CapsLockOn --&gt; CapsLockOff : EvCapsLockPressed
  --
  [*] -&gt; ScrollLockOff
  ScrollLockOff --&gt; ScrollLockOn : EvScrollLockPressed
  ScrollLockOn --&gt; ScrollLockOff : EvScrollLockPressed
}

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="303" height="626" class="scale" src="imgw/img-b84f91ab304f48c1054e044f120d4a61.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h3>Vertical separator <code class="cod">||</code></h3><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msge867f40d791b91d3d2e45a5f658d30c6" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imge867f40d791b91d3d2e45a5f658d30c6" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;e867f40d791b91d3d2e45a5f658d30c6&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;e867f40d791b91d3d2e45a5f658d30c6&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;e867f40d791b91d3d2e45a5f658d30c6&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pree867f40d791b91d3d2e45a5f658d30c6">@startuml
[*] --&gt; Active

state Active {
  [*] -&gt; NumLockOff
  NumLockOff --&gt; NumLockOn : EvNumLockPressed
  NumLockOn --&gt; NumLockOff : EvNumLockPressed
  ||
  [*] -&gt; CapsLockOff
  CapsLockOff --&gt; CapsLockOn : EvCapsLockPressed
  CapsLockOn --&gt; CapsLockOff : EvCapsLockPressed
  ||
  [*] -&gt; ScrollLockOff
  ScrollLockOff --&gt; ScrollLockOn : EvScrollLockPressed
  ScrollLockOn --&gt; ScrollLockOff : EvScrollLockPressed
}

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="824" height="298" class="scale" src="imgw/img-e867f40d791b91d3d2e45a5f658d30c6.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/3086/state-diagram-concurrent-state-horizontal-line">QA-3086</a>]</em><a style="position:relative;top:-38px;" name="8bd6f7be727fb20e"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-116"></span><!-- ezoic_pub_ad_placeholder-116-longer_content-234x60-116-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-116-longer_content-468x60-116-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-116-longer_content-728x90-116-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-116-longer_content-970x90-116-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#8"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#8"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#8"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Conditional [choice]</h2><p></p> The stereotype <code class="cod">&lt;&lt;choice&gt;&gt;</code> can be used to use conditional state. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg5d706b0c55f707d23549c3e341830c01" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img5d706b0c55f707d23549c3e341830c01" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;5d706b0c55f707d23549c3e341830c01&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;5d706b0c55f707d23549c3e341830c01&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;5d706b0c55f707d23549c3e341830c01&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre5d706b0c55f707d23549c3e341830c01">@startuml
state &#34;Req(Id)&#34; as ReqId &lt;&lt;sdlreceive&gt;&gt;
state &#34;Minor(Id)&#34; as MinorId
state &#34;Major(Id)&#34; as MajorId
 
state c &lt;&lt;choice&gt;&gt;
 
Idle --&gt; ReqId
ReqId --&gt; c
c --&gt; MinorId : [Id &lt;= 10]
c --&gt; MajorId : [Id &gt; 10]
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="200" height="384" class="scale" src="imgw/img-5d706b0c55f707d23549c3e341830c01.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="7d846fdb90b0c51d"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#9"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#9"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#9"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Stereotypes full example [start, choice, fork, join, end]</h2><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg05626c345b8890f16f13c27dc5b09bea" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img05626c345b8890f16f13c27dc5b09bea" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;05626c345b8890f16f13c27dc5b09bea&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;05626c345b8890f16f13c27dc5b09bea&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;05626c345b8890f16f13c27dc5b09bea&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre05626c345b8890f16f13c27dc5b09bea">@startuml
state start1  &lt;&lt;start&gt;&gt;
state choice1 &lt;&lt;choice&gt;&gt;
state fork1   &lt;&lt;fork&gt;&gt;
state join2   &lt;&lt;join&gt;&gt;
state end3    &lt;&lt;end&gt;&gt;

[*]     --&gt; choice1 : from start\nto choice
start1  --&gt; choice1 : from start stereo\nto choice

choice1 --&gt; fork1   : from choice\nto fork
choice1 --&gt; join2   : from choice\nto join
choice1 --&gt; end3    : from choice\nto end stereo

fork1   ---&gt; State1 : from fork\nto state
fork1   --&gt; State2  : from fork\nto state

State2  --&gt; join2   : from state\nto join
State1  --&gt; [*]     : from state\nto end

join2   --&gt; [*]     : from join\nto end
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="359" height="669" class="scale" src="imgw/img-05626c345b8890f16f13c27dc5b09bea.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/404/choice-pseudostate?show=436#c436">QA-404</a>, <a href="https://forum.plantuml.net/1159/choice-pseudostate-and-guard-condition-in-state-diagrams?show=1161#a1161">QA-1159</a> and <a href="https://github.com/plantuml/plantuml/pull/887">GH-887</a>]</em><a style="position:relative;top:-38px;" name="6929d1066a9e828a"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-117"></span><!-- ezoic_pub_ad_placeholder-117-longest_content-234x60-117-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-117-longest_content-468x60-117-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-117-longest_content-728x90-117-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-117-longest_content-970x90-117-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#10"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#10"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#10"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Point [entryPoint, exitPoint]</h2><p></p> You can add <strong>point</strong> with <code class="cod">&lt;&lt;entryPoint&gt;&gt;</code> and <code class="cod">&lt;&lt;exitPoint&gt;&gt;</code> stereotypes: <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgb9fd5f82d17218b3f85fe5260d30db72" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgb9fd5f82d17218b3f85fe5260d30db72" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;b9fd5f82d17218b3f85fe5260d30db72&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;b9fd5f82d17218b3f85fe5260d30db72&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;b9fd5f82d17218b3f85fe5260d30db72&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="preb9fd5f82d17218b3f85fe5260d30db72">@startuml
state Somp {
  state entry1 &lt;&lt;entryPoint&gt;&gt;
  state entry2 &lt;&lt;entryPoint&gt;&gt;
  state sin
  entry1 --&gt; sin
  entry2 -&gt; sin
  sin -&gt; sin2
  sin2 --&gt; exitA &lt;&lt;exitPoint&gt;&gt;
}

[*] --&gt; entry1
exitA --&gt; Foo
Foo1 -&gt; entry2
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="241" height="433" class="scale" src="imgw/img-b9fd5f82d17218b3f85fe5260d30db72.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="f38ba2410a08cd85"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#11"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#11"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#11"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Pin [inputPin, outputPin]</h2><p></p> You can add <strong>pin</strong> with <code class="cod">&lt;&lt;inputPin&gt;&gt;</code> and <code class="cod">&lt;&lt;outputPin&gt;&gt;</code> stereotypes: <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg0c464c41de5d6659085a9ca814a43a45" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img0c464c41de5d6659085a9ca814a43a45" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;0c464c41de5d6659085a9ca814a43a45&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;0c464c41de5d6659085a9ca814a43a45&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;0c464c41de5d6659085a9ca814a43a45&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre0c464c41de5d6659085a9ca814a43a45">@startuml
state Somp {
  state entry1 &lt;&lt;inputPin&gt;&gt;
  state entry2 &lt;&lt;inputPin&gt;&gt;
  state sin
  entry1 --&gt; sin
  entry2 -&gt; sin
  sin -&gt; sin2
  sin2 --&gt; exitA &lt;&lt;outputPin&gt;&gt;
}

[*] --&gt; entry1
exitA --&gt; Foo
Foo1 -&gt; entry2
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="241" height="433" class="scale" src="imgw/img-0c464c41de5d6659085a9ca814a43a45.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/4309/entrypoints-exitpoints-expansioninput-expansionoutput">QA-4309</a>]</em><a style="position:relative;top:-38px;" name="45b17c6b99df6bf4"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-118"></span><!-- ezoic_pub_ad_placeholder-118-incontent_5-234x60-118-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-118-incontent_5-468x60-118-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-118-incontent_5-728x90-118-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-118-incontent_5-970x90-118-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#12"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#12"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#12"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Expansion [expansionInput, expansionOutput]</h2><p></p> You can add <strong>expansion</strong> with <code class="cod">&lt;&lt;expansionInput&gt;&gt;</code> and <code class="cod">&lt;&lt;expansionOutput&gt;&gt;</code> stereotypes: <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg5b9acf2e641f724b317473125a06d205" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img5b9acf2e641f724b317473125a06d205" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;5b9acf2e641f724b317473125a06d205&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;5b9acf2e641f724b317473125a06d205&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;5b9acf2e641f724b317473125a06d205&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre5b9acf2e641f724b317473125a06d205">@startuml
state Somp {
  state entry1 &lt;&lt;expansionInput&gt;&gt;
  state entry2 &lt;&lt;expansionInput&gt;&gt;
  state sin
  entry1 --&gt; sin
  entry2 -&gt; sin
  sin -&gt; sin2
  sin2 --&gt; exitA &lt;&lt;expansionOutput&gt;&gt;
}

[*] --&gt; entry1
exitA --&gt; Foo
Foo1 -&gt; entry2
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="245" height="433" class="scale" src="imgw/img-5b9acf2e641f724b317473125a06d205.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/4309/entrypoints-exitpoints-expansioninput-expansionoutput">QA-4309</a>]</em><a style="position:relative;top:-38px;" name="764824584d438a62"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#13"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#13"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#13"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Arrow direction</h2><p></p> You can use <code class="cod">-&gt;</code> for horizontal arrows. It is possible to force arrow&#39;s direction using the following syntax: <ul><li><code class="cod">-down-&gt;</code> or <code class="cod">--&gt;</code></li><li><code class="cod">-right-&gt;</code> or <code class="cod">-&gt;</code><em>(default arrow)</em></li><li><code class="cod">-left-&gt;</code></li><li><code class="cod">-up-&gt;</code></li></ul><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg418de3761dd3316b99b58b66b1792766" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img418de3761dd3316b99b58b66b1792766" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;418de3761dd3316b99b58b66b1792766&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;418de3761dd3316b99b58b66b1792766&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;418de3761dd3316b99b58b66b1792766&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre418de3761dd3316b99b58b66b1792766">@startuml

[*] -up-&gt; First
First -right-&gt; Second
Second --&gt; Third
Third -left-&gt; Last

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="205" height="172" class="scale" src="imgw/img-418de3761dd3316b99b58b66b1792766.png"/></div></div></td></tr></tbody></table></p><p> You can shorten the arrow definition by using only the first character of the direction (for example, <code class="cod">-d-</code> instead of <code class="cod">-down-</code>) or the two first characters (<code class="cod">-do-</code>). </p><p></p> Please note that you should not abuse this functionality : <em>Graphviz</em> gives usually good results without tweaking. <a style="position:relative;top:-38px;" name="9e62e79149a86c5d"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-119"></span><!-- ezoic_pub_ad_placeholder-119-incontent_6-234x60-119-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-119-incontent_6-468x60-119-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-119-incontent_6-728x90-119-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-119-incontent_6-970x90-119-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#14"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#14"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#14"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Change line color and style</h2><p></p> You can change line <a href="color.html">color</a> and/or line style. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgf2e9c1445ba7ade57fc3675eba54065c" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgf2e9c1445ba7ade57fc3675eba54065c" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;f2e9c1445ba7ade57fc3675eba54065c&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;f2e9c1445ba7ade57fc3675eba54065c&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;f2e9c1445ba7ade57fc3675eba54065c&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pref2e9c1445ba7ade57fc3675eba54065c">@startuml
State S1
State S2
S1 -[#DD00AA]-&gt; S2
S1 -left[#yellow]-&gt; S3
S1 -up[#red,dashed]-&gt; S4
S1 -right[dotted,#blue]-&gt; S5

X1 -[dashed]-&gt; X2
Z1 -[dotted]-&gt; Z2
Y1 -[#blue,bold]-&gt; Y2
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="488" height="282" class="scale" src="imgw/img-f2e9c1445ba7ade57fc3675eba54065c.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="http://wiki.plantuml.net/site/incubation#change_line_color_in_state_diagrams">Incubation: Change line color in state diagrams</a>]</em><a style="position:relative;top:-38px;" name="3b0649c72650c313"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#15"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#15"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#15"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Note</h2><p></p> You can also define notes using <code class="cod">note left of</code>, <code class="cod">note right of</code>, <code class="cod">note top of</code>, <code class="cod">note bottom of</code> keywords. <p></p> You can also define notes on several lines. <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg6e60869bac9dbf171c58be4d3ebad20d" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img6e60869bac9dbf171c58be4d3ebad20d" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;6e60869bac9dbf171c58be4d3ebad20d&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;6e60869bac9dbf171c58be4d3ebad20d&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;6e60869bac9dbf171c58be4d3ebad20d&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre6e60869bac9dbf171c58be4d3ebad20d">@startuml

[*] --&gt; Active
Active --&gt; Inactive

note left of Active : this is a short\nnote

note right of Inactive
  A note can also
  be defined on
  several lines
end note

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="357" height="261" class="scale" src="imgw/img-6e60869bac9dbf171c58be4d3ebad20d.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p></p> You can also have floating notes. <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg826e4c302a0426227e36acda48659d3e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img826e4c302a0426227e36acda48659d3e" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;826e4c302a0426227e36acda48659d3e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;826e4c302a0426227e36acda48659d3e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;826e4c302a0426227e36acda48659d3e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre826e4c302a0426227e36acda48659d3e">@startuml

state foo
note &#34;This is a floating note&#34; as N1

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="242" height="62" class="scale" src="imgw/img-826e4c302a0426227e36acda48659d3e.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="e1b0c1a155ce6cc5"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-120"></span><!-- ezoic_pub_ad_placeholder-120-incontent_7-234x60-120-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-120-incontent_7-468x60-120-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-120-incontent_7-728x90-120-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-120-incontent_7-970x90-120-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#16"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#16"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#16"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Note on link</h2><p></p> You can put notes on state-transition or link, with <code class="cod">note on link</code> keyword. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg68221d1d16e4f596e99e00c27cf3b34b" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img68221d1d16e4f596e99e00c27cf3b34b" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;68221d1d16e4f596e99e00c27cf3b34b&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;68221d1d16e4f596e99e00c27cf3b34b&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;68221d1d16e4f596e99e00c27cf3b34b&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre68221d1d16e4f596e99e00c27cf3b34b">@startuml
[*] -&gt; State1
State1 --&gt; State2
note on link 
  this is a state-transition note 
end note
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="293" height="208" class="scale" src="imgw/img-68221d1d16e4f596e99e00c27cf3b34b.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="c8857585cebfbd1c"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#17"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#17"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#17"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>More in notes</h2><p></p><p></p> You can put notes on composite states. <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgaad6b8baaa7c307ad3dd58047ceded3e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgaad6b8baaa7c307ad3dd58047ceded3e" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;aad6b8baaa7c307ad3dd58047ceded3e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;aad6b8baaa7c307ad3dd58047ceded3e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;aad6b8baaa7c307ad3dd58047ceded3e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="preaad6b8baaa7c307ad3dd58047ceded3e">@startuml

[*] --&gt; NotShooting

state &#34;Not Shooting State&#34; as NotShooting {
  state &#34;Idle mode&#34; as Idle
  state &#34;Configuring mode&#34; as Configuring
  [*] --&gt; Idle
  Idle --&gt; Configuring : EvConfig
  Configuring --&gt; Idle : EvConfig
}

note right of NotShooting : This is a note on a composite state

@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="428" height="350" class="scale" src="imgw/img-aad6b8baaa7c307ad3dd58047ceded3e.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><a style="position:relative;top:-38px;" name="536671b19fc4b7e0"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-121"></span><!-- ezoic_pub_ad_placeholder-121-incontent_8-234x60-121-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-121-incontent_8-468x60-121-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-121-incontent_8-728x90-121-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-121-incontent_8-970x90-121-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#18"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#18"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#18"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Inline color</h2><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg6d62fd34fbe48f4b184ccc475d2f6a16" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img6d62fd34fbe48f4b184ccc475d2f6a16" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;6d62fd34fbe48f4b184ccc475d2f6a16&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;6d62fd34fbe48f4b184ccc475d2f6a16&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;6d62fd34fbe48f4b184ccc475d2f6a16&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre6d62fd34fbe48f4b184ccc475d2f6a16">@startuml
state CurrentSite #pink {
    state HardwareSetup #lightblue {
       state Site #brown
        Site -[hidden]-&gt; Controller
        Controller -[hidden]-&gt; Devices
    }
    state PresentationSetup{
        Groups -[hidden]-&gt; PlansAndGraphics
    }
    state Trends #FFFF77
    state Schedule #magenta
    state AlarmSupression
}
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="653" height="333" class="scale" src="imgw/img-6d62fd34fbe48f4b184ccc475d2f6a16.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/1812">QA-1812</a>]</em><a style="position:relative;top:-38px;" name="7aa53dbdfc2137bf"></a><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#19"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#19"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#19"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Skinparam</h2><p></p><p></p> You can use the <a href="skinparam.html">skinparam</a> command to change colors and fonts for the drawing. <p></p> You can use this command : <ul><li>In the diagram definition, like any other commands,</li><li>In an <a href="preprocessing.html">included file</a>,</li><li>In a configuration file, provided in the <a href="command-line.html">command line</a> or the <a href="ant-task.html">Ant task</a>.</li></ul> You can define specific color and fonts for stereotyped states. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg7f41fc2223cebd1e18e464e7fc445c23" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img7f41fc2223cebd1e18e464e7fc445c23" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;7f41fc2223cebd1e18e464e7fc445c23&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;7f41fc2223cebd1e18e464e7fc445c23&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;7f41fc2223cebd1e18e464e7fc445c23&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre7f41fc2223cebd1e18e464e7fc445c23">@startuml
skinparam backgroundColor LightYellow
skinparam state {
  StartColor MediumBlue
  EndColor Red
  BackgroundColor Peru
  BackgroundColor&lt;&lt;Warning&gt;&gt; Olive
  BorderColor Gray
  FontName Impact
}

[*] --&gt; NotShooting

state &#34;Not Shooting State&#34; as NotShooting {
  state &#34;Idle mode&#34; as Idle &lt;&lt;Warning&gt;&gt;
  state &#34;Configuring mode&#34; as Configuring
  [*] --&gt; Idle
  Idle --&gt; Configuring : EvConfig
  Configuring --&gt; Idle : EvConfig
}

NotShooting --&gt; [*]
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="162" height="432" class="scale" src="imgw/img-7f41fc2223cebd1e18e464e7fc445c23.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><h3>Test of all specific skinparam to State Diagrams</h3><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg93140996fb842751bee7511b42b3f436" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img93140996fb842751bee7511b42b3f436" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;93140996fb842751bee7511b42b3f436&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;93140996fb842751bee7511b42b3f436&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;93140996fb842751bee7511b42b3f436&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre93140996fb842751bee7511b42b3f436">@startuml
skinparam State {
  AttributeFontColor blue
  AttributeFontName serif
  AttributeFontSize  9
  AttributeFontStyle italic
  BackgroundColor palegreen
  BorderColor violet
  EndColor gold
  FontColor red
  FontName Sanserif
  FontSize 15
  FontStyle bold
  StartColor silver
}

state A : a a a\na
state B : b b b\nb

[*] -&gt; A  : start
A -&gt; B : a2b
B -&gt; [*] : end
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="338" height="88" class="scale" src="imgw/img-93140996fb842751bee7511b42b3f436.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="edc06c934e9e5fc5"></a></p><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-122"></span><!-- ezoic_pub_ad_placeholder-122-incontent_9-234x60-122-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-122-incontent_9-468x60-122-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-122-incontent_9-728x90-122-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-122-incontent_9-970x90-122-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#20"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#20"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#20"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Changing style</h2><p></p> You can change <a href="style-evolution.html">style</a>. <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg7f34caaebae67e342a2e3df11465d292" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img7f34caaebae67e342a2e3df11465d292" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;7f34caaebae67e342a2e3df11465d292&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;7f34caaebae67e342a2e3df11465d292&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;7f34caaebae67e342a2e3df11465d292&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre7f34caaebae67e342a2e3df11465d292">@startuml

&lt;style&gt;
stateDiagram {
  BackgroundColor Peru
  &#39;LineColor Gray
  FontName Impact
  FontColor Red
  arrow {
    FontSize 13
    LineColor Blue
  }
}
&lt;/style&gt;


[*] --&gt; NotShooting

state &#34;Not Shooting State&#34; as NotShooting {
  state &#34;Idle mode&#34; as Idle &lt;&lt;Warning&gt;&gt;
  state &#34;Configuring mode&#34; as Configuring
  [*] --&gt; Idle
  Idle --&gt; Configuring : EvConfig
  Configuring --&gt; Idle : EvConfig
}

NotShooting --&gt; [*]
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="156" height="431" class="scale" src="imgw/img-7f34caaebae67e342a2e3df11465d292.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg275ae27f74285761678110725972328e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img275ae27f74285761678110725972328e" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;275ae27f74285761678110725972328e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;275ae27f74285761678110725972328e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;275ae27f74285761678110725972328e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre275ae27f74285761678110725972328e">@startuml
&lt;style&gt;
  diamond {
    BackgroundColor #palegreen
    LineColor #green
    LineThickness 2.5
}
&lt;/style&gt;
state state1
state state2 
state choice1 &lt;&lt;choice&gt;&gt;
state end3    &lt;&lt;end&gt;&gt;

state1  --&gt; choice1 : 1
choice1 --&gt; state2  : 2
choice1 --&gt; end3    : 3
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="128" height="292" class="scale" src="imgw/img-275ae27f74285761678110725972328e.png"/></div></div></td></tr></tbody></table></p><p><em>[Ref. <a href="https://github.com/plantuml/plantuml/issues/880#issuecomment-1022278138">GH-880</a>]</em><a style="position:relative;top:-38px;" name="671b82c7f585444b"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#21"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#21"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#21"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Change state color and style (inline style)</h2><p></p> You can change the <a href="color.html">color</a> or style of individual state using the following notation: <p></p><ul><li><code class="cod">#color ##[style]color</code></li></ul><p></p> With background color first (<code class="cod">#color</code>), then line style and line color (<code class="cod">##[style]color</code> ). <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg3a34b0b5b8f7b4102b574ca37b6e4e1e" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img3a34b0b5b8f7b4102b574ca37b6e4e1e" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;3a34b0b5b8f7b4102b574ca37b6e4e1e&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;3a34b0b5b8f7b4102b574ca37b6e4e1e&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;3a34b0b5b8f7b4102b574ca37b6e4e1e&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre3a34b0b5b8f7b4102b574ca37b6e4e1e">@startuml
state FooGradient #red-green ##00FFFF
state FooDashed #red|green ##[dashed]blue {
}
state FooDotted ##[dotted]blue {
}
state FooBold ##[bold] {
}
state Foo1 ##[dotted]green {
state inner1 ##[dotted]yellow
}

state out ##[dotted]gold

state Foo2 ##[bold]green {
state inner2 ##[dotted]yellow
}
inner1 -&gt; inner2
out -&gt; inner2
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="784" height="114" class="scale" src="imgw/img-3a34b0b5b8f7b4102b574ca37b6e4e1e.png"/></div></div></td></tr></tbody></table></p><p><em>[Ref. <a href="https://forum.plantuml.net/1487">QA-1487</a>]</em></p><p></p><p></p><ul><li><code class="cod">#color;line:color;line.[bold|dashed|dotted];text:color</code></li></ul><p></p><div class="tag" style="background:#FFD700;">FIXME</div> 🚩 <code class="cod">text:color</code> seems not to be taken into account <div class="tag" style="background:#FFD700;">FIXME</div><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgdef48a2ce87ba792e660613b132cae1c" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgdef48a2ce87ba792e660613b132cae1c" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;def48a2ce87ba792e660613b132cae1c&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;def48a2ce87ba792e660613b132cae1c&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;def48a2ce87ba792e660613b132cae1c&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="predef48a2ce87ba792e660613b132cae1c">@startuml
@startuml
state FooGradient #red-green;line:00FFFF
state FooDashed #red|green;line.dashed;line:blue {
}
state FooDotted #line.dotted;line:blue {
}
state FooBold #line.bold {
}
state Foo1 #line.dotted;line:green {
state inner1 #line.dotted;line:yellow
}

state out #line.dotted;line:gold

state Foo2 #line.bold;line:green {
state inner2 #line.dotted;line:yellow
}
inner1 -&gt; inner2
out -&gt; inner2
@enduml
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="784" height="114" class="scale" src="imgw/img-def48a2ce87ba792e660613b132cae1c.png"/></div></div></td></tr></tbody></table></p><p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgb1ec2d4f0f72463ce3ef154292315553" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgb1ec2d4f0f72463ce3ef154292315553" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;b1ec2d4f0f72463ce3ef154292315553&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;b1ec2d4f0f72463ce3ef154292315553&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;b1ec2d4f0f72463ce3ef154292315553&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="preb1ec2d4f0f72463ce3ef154292315553">@startuml
state s1 : s1 description
state s2 #pink;line:red;line.bold;text:red : s2 description
state s3 #palegreen;line:green;line.dashed;text:green : s3 description
state s4 #aliceblue;line:blue;line.dotted;text:blue   : s4 description
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="510" height="64" class="scale" src="imgw/img-b1ec2d4f0f72463ce3ef154292315553.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Adapted from <a href="https://forum.plantuml.net/3770">QA-3770</a>]</em><a style="position:relative;top:-38px;" name="effdb9ce6c5d44df"></a><div style="clear:both;min-height:110px;margin-top:10px;"><div class="pezoic"><span id="ezoic-pub-ad-placeholder-123"></span><!-- ezoic_pub_ad_placeholder-123-incontent_10-234x60-123-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-123-incontent_10-468x60-123-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-123-incontent_10-728x90-123-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-123-incontent_10-970x90-123-nonexxxnonexxxxxxezmaxscaleval100 --></div></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#22"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#22"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#22"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Alias</h2><p></p> With State you can use <code class="cod">alias</code>, like: <p></p><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgdde84ab3387004aca5abe8dffc441e36" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgdde84ab3387004aca5abe8dffc441e36" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;dde84ab3387004aca5abe8dffc441e36&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;dde84ab3387004aca5abe8dffc441e36&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;dde84ab3387004aca5abe8dffc441e36&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="predde84ab3387004aca5abe8dffc441e36">@startuml
state alias1 
state &#34;alias2&#34;
state &#34;long name&#34; as alias3
state alias4 as &#34;long name&#34;

alias1 : &#34;&#34;state alias1&#34;&#34;
alias2 : &#34;&#34;state &#34;alias2&#34;&#34;&#34;
alias3 : &#34;&#34;state &#34;long name&#34; as alias3&#34;&#34;
alias4 : &#34;&#34;state alias4 as &#34;long name&#34;&#34;&#34;

alias1 -&gt; alias2
alias2 -&gt; alias3
alias3 -&gt; alias4
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="753" height="65" class="scale" src="imgw/img-dde84ab3387004aca5abe8dffc441e36.png"/></div></div></td></tr></tbody></table></p><p></p><p></p> or: <p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msg8817edeebb5584a75efdea6741635f93" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="img8817edeebb5584a75efdea6741635f93" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;8817edeebb5584a75efdea6741635f93&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;8817edeebb5584a75efdea6741635f93&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;8817edeebb5584a75efdea6741635f93&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="pre8817edeebb5584a75efdea6741635f93">@startuml
state alias1 : &#34;&#34;state alias1&#34;&#34;
state &#34;alias2&#34; : &#34;&#34;state &#34;alias2&#34;&#34;&#34;
state &#34;long name&#34; as alias3 : &#34;&#34;state &#34;long name&#34; as alias3&#34;&#34;
state alias4 as &#34;long name&#34; : &#34;&#34;state alias4 as &#34;long name&#34;&#34;&#34;

alias1 -&gt; alias2
alias2 -&gt; alias3
alias3 -&gt; alias4
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="753" height="65" class="scale" src="imgw/img-8817edeebb5584a75efdea6741635f93.png"/></div></div></td></tr></tbody></table></p><p><a style="position:relative;top:-38px;" name="84fccc92ba6ffe09"></a></p><div style="clear:both;height:50px;"></div><h2 class="chap"><img onclick="window.scrollTo(0,0);" title="Back to top" src="backtop1.svg" width="20" height="20" class="backtop"/><div class="dropdown"><button class="dropbtn"><img width="16" height="16" src="edit1.svg"/></button><div class="dropdown-content"><a href="http://alphadoc.plantuml.com/doc/dokuwiki/en/state-diagram#23"><img width="20" height="20" src="dokuwiki.png"/>Edit in Dokuwiki</a><a href="http://alphadoc.plantuml.com/doc/asciidoc/en/state-diagram#23"><img width="20" height="20" src="asciidoc32.png"/>Edit in Asciidoc</a><a href="http://alphadoc.plantuml.com/doc/markdown/en/state-diagram#23"><img width="20" height="20" src="markdown.png"/>Edit in Markdown</a></div></div>Display JSON Data on State diagram</h2><p></p><h3>Simple example</h3><p><table class="coptable" valign="top" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top"><div id="msgbacfb282db8bb1339700cf4edf3260d9" class="msg"> 🎉 Copied! </div><img loading="lazy" width="16" height="16" id="imgbacfb282db8bb1339700cf4edf3260d9" title="Copy to clipboard" class="cop" src="clipboard1.svg" onclick="ctc(&#39;bacfb282db8bb1339700cf4edf3260d9&#39;)"/><br/><img loading="lazy" width="16" height="16" title="Edit online" class="cop" src="edit1.svg" onclick="javascript:ljs(&#39;bacfb282db8bb1339700cf4edf3260d9&#39;)"/></td><td><div class="mytab" onclick="javascript:ljs(&#39;bacfb282db8bb1339700cf4edf3260d9&#39;)"><div class="mycell0"><code onmouseover="az=1" onmouseout="az=0"><pre id="prebacfb282db8bb1339700cf4edf3260d9">@startuml
state &#34;A&#34; as stateA
state &#34;C&#34; as stateC {
 state B
}

json jsonJ {
   &#34;fruit&#34;:&#34;Apple&#34;,
   &#34;size&#34;:&#34;Large&#34;,
   &#34;color&#34;: [&#34;Red&#34;, &#34;Green&#34;]
}
@enduml
</pre></code></div><div class="mycell"><img loading="lazy" width="303" height="121" class="scale" src="imgw/img-bacfb282db8bb1339700cf4edf3260d9.png"/></div></div></td></tr></tbody></table></p><p></p><p></p><em>[Ref. <a href="https://forum.plantuml.net/17275/composite-state-functionality-with-allow_mixing?show=17287#a17287">QA-17275</a>]</em><p></p> For another example, see on <a href="json.html#wqimfur1rox7ld5sjljq">JSON page</a>. </td><td id="toctd" valign="top" style="max-width:240px;min-width:240px;"><div id="toc"><ul><li><a href="state-diagram.html#7d9e703ac421ea25">Simple State</a></li><li><a href="state-diagram.html#b99e918943f68545">Change state rendering</a></li><li><a href="state-diagram.html#a70cc614da79064a">Composite state</a></li><li><a href="state-diagram.html#ed8ef97e6d16ba84">Long name</a></li><li><a href="state-diagram.html#73b918d90b24a6c6">History [[H], [H\*]]</a></li><li><a href="state-diagram.html#7443558300f98341">Fork [fork, join]</a></li><li><a href="state-diagram.html#cb648904a5cede7d">Concurrent state [--, \|\|]</a></li><li><a href="state-diagram.html#8bd6f7be727fb20e">Conditional [choice]</a></li><li><a href="state-diagram.html#7d846fdb90b0c51d">Stereotypes full example [start, choice, fork, join, end]</a></li><li><a href="state-diagram.html#6929d1066a9e828a">Point [entryPoint, exitPoint]</a></li><li><a href="state-diagram.html#f38ba2410a08cd85">Pin [inputPin, outputPin]</a></li><li><a href="state-diagram.html#45b17c6b99df6bf4">Expansion [expansionInput, expansionOutput]</a></li><li><a href="state-diagram.html#764824584d438a62">Arrow direction</a></li><li><a href="state-diagram.html#9e62e79149a86c5d">Change line color and style</a></li><li><a href="state-diagram.html#3b0649c72650c313">Note</a></li><li><a href="state-diagram.html#e1b0c1a155ce6cc5">Note on link</a></li><li><a href="state-diagram.html#c8857585cebfbd1c">More in notes</a></li><li><a href="state-diagram.html#536671b19fc4b7e0">Inline color</a></li><li><a href="state-diagram.html#7aa53dbdfc2137bf">Skinparam</a></li><li><a href="state-diagram.html#edc06c934e9e5fc5">Changing style</a></li><li><a href="state-diagram.html#671b82c7f585444b">Change state color and style (inline style)</a></li><li><a href="state-diagram.html#effdb9ce6c5d44df">Alias</a></li><li><a href="state-diagram.html#84fccc92ba6ffe09">Display JSON Data on State diagram</a></li></ul></div></td></tr></tbody></table></p><p></p><span id="ezoic-pub-ad-placeholder-104"></span><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-234x60-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-468x60-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-728x90-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-970x250-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-300x250x3-104-nonexxxnonexxxxxxezmaxscaleval100 --><!-- ezoic_pub_ad_placeholder-104-bottom_of_page-970x90-104-nonexxxnonexxxxxxezmaxscaleval100 --></div><style>.btm{text-align:center}.btm a{text-decoration:none;color:#637282}.btm a:hover{color:#0366d6}</style><div class="btm"><hr/><a href="https://g.ezoic.net/privacy/plantuml.com"><small>Privacy Policy</small></a>      <a href="direct-sales.html"><small>Advertise</small></a><p></p></div><script>var sc_project=11133780;var sc_invisible=1;var sc_security="3da8bfdb";</script><script async="" src="https://www.statcounter.com/counter/counter.js"></script><!--[selectrongo:done]--><script type="text/javascript">
				var __inScopeForCCPA = false;
		function __uspapi(command, version, callback) {
			var response = null;
			var successs = false;
			if (command === "getUSPData" && version === 1) {
				var uspString = "1"; // Version
				if (__inScopeForCCPA) {
					uspString += "N"; // Has Explicit Notice for Opt Out been provided (ex footer or minor consent modal)
					var result;
					var consentCookie = (result = new RegExp('(?:^|; )ezoccpaconsent=([^;]*)').exec(document.cookie)) ? (result[1]) : null;
					if (consentCookie === "nonconsent") {
						uspString += "Y";
					}
					else {
						uspString += "N";
					}
					uspString += "N" // Is pub a signatory to the IAB Limited Service Provider Agreement (http://www.iabprivacy.com/)
				}
				else {
					uspString += "---";
				}
				response = {
					uspString: uspString,
					version: 1
				};
				success = true;
			}
			return callback(response, success);
		};
		function __receiveUspapiMessage(event) {
			if (event.data.hasOwnProperty('__uspapiCall')) {
				__uspapi('getUSPData', 1, function(uspData, success) {
					event.source.postMessage({
						__uspapiReturn: {
							returnValue: uspData,
							success: success,
							callId: event.data.__uspapiCall.callId
						}
					},
					event.origin);
				});
			}
			return null;
		};
		window.addEventListener("message", __receiveUspapiMessage, false);
</script>
<script>__ez.queue.addFile('/tardisrocinante/vitals.js', '/tardisrocinante/vitals.js?gcb=2&cb=3', false, ['/parsonsmaize/mulvane.js'], true, false, true, false);</script>
<script>var _audins_dom="plantuml_com",_audins_did=173770;__ez.queue.addDelayFunc("audins.js","__ez.script.add", "//go.ezodn.com/detroitchicago/audins.js?cb=195-2");</script><noscript><div style="display:none;"><img src="https://pixel.quantserve.com/pixel/p-31iz6hfFutd16.gif?labels=Domain.plantuml_com,DomainId.173770" border="0" height="1" width="1" alt="Quantcast"/></div></noscript>
<script>__ez.queue.addFile('/beardeddragon/drake.js', '/beardeddragon/drake.js?gcb=2&cb=4', false, [], true, false, true, false);</script>
<script type="text/javascript" style='display:none;'>var __ez_dims = (function() {
		var setCookie = function( name, content, expiry ) {
			return document.cookie = name+'='+content+((expiry)?';expires='+(new Date(Math.floor(new Date().getTime()+expiry*1000)).toUTCString()):'')+';path=/';
		};
		var ffid = 1;
		var oh = window.screen.height;
		var ow = window.screen.width;
		var h = ffid === 1 ? oh : (oh > ow) ? oh : ow;
		var w = ffid === 1 ? ow : (oh > ow) ? ow : oh;
		var uh = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
		var uw = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
		setCookie('ezds', encodeURIComponent('ffid='+ffid+',w='+w+',h='+h), (31536e3*7));
		setCookie('ezohw', encodeURIComponent('w='+uw+',h='+uh), (31536e3*7));
	})();</script>
<script type='text/javascript' style='display:none;' async>__ez.queue.addFile('/parsonsmaize/chanute.js', '/parsonsmaize/chanute.js?a=a&cb=7&dcb=195-2&shcb=34', true, ['/parsonsmaize/mulvane.js'], true, false, false, false);</script>
<script type='text/javascript' style='display:none;' async>__ez.queue.addFile('/porpoiseant/jellyfish.js', '/porpoiseant/jellyfish.js?a=a&cb=10&dcb=195-2&shcb=34', false, [], true, false, false, false);</script></body></html>